package com.atguigu.gulimall.search.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Copyright (c) 2019-2029 星大陆 All Rights Reserved
 * <p>
 * Project: gulimall
 * Package: com.atguigu.gulimall.search.feign
 * Version: V 1.0
 * <p>
 * Created by guoxiaolong on 2020/08/07 8:25
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 信息
     * 功能：查询属性详情
     * API：https://easydoc.xyz/doc/75716633/ZUqEdvA4/7C3tMIuF
     */
    @RequestMapping("/product/attr/info/{attrId}")
    R info(@PathVariable("attrId") Long attrId);

    @GetMapping("/product/attr/info/{attrId}")
    R attrsInfo(@PathVariable("attrId") Long attrId);

    @GetMapping("/product/brand/infos")
    R getBrands(@RequestParam("brandIds") List<Long> brandIds);

}
